/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Facundo
 */
@Entity
@Table(name = "configuracion_mail")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ConfiguracionMail.findAll", query = "SELECT c FROM ConfiguracionMail c"),
    @NamedQuery(name = "ConfiguracionMail.findById", query = "SELECT c FROM ConfiguracionMail c WHERE c.id = :id"),
    @NamedQuery(name = "ConfiguracionMail.findByUserMail", query = "SELECT c FROM ConfiguracionMail c WHERE c.userMail = :userMail"),
    @NamedQuery(name = "ConfiguracionMail.findByPassMail", query = "SELECT c FROM ConfiguracionMail c WHERE c.passMail = :passMail"),
    @NamedQuery(name = "ConfiguracionMail.findByFromMail", query = "SELECT c FROM ConfiguracionMail c WHERE c.fromMail = :fromMail"),
    @NamedQuery(name = "ConfiguracionMail.findByPortMail", query = "SELECT c FROM ConfiguracionMail c WHERE c.portMail = :portMail"),
    @NamedQuery(name = "ConfiguracionMail.findBySmtpHostmail", query = "SELECT c FROM ConfiguracionMail c WHERE c.smtpHostmail = :smtpHostmail")})
public class ConfiguracionMail implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "user_mail")
    private String userMail;
    @Basic(optional = false)
    @Column(name = "pass_mail")
    private String passMail;
    @Basic(optional = false)
    @Column(name = "from_mail")
    private String fromMail;
    @Basic(optional = false)
    @Column(name = "port_mail")
    private int portMail;
    @Basic(optional = false)
    @Column(name = "smtpHost_mail")
    private String smtpHostmail;

    public ConfiguracionMail() {
    }

    public ConfiguracionMail(Integer id) {
        this.id = id;
    }

    public ConfiguracionMail(Integer id, String userMail, String passMail, String fromMail, int portMail, String smtpHostmail) {
        this.id = id;
        this.userMail = userMail;
        this.passMail = passMail;
        this.fromMail = fromMail;
        this.portMail = portMail;
        this.smtpHostmail = smtpHostmail;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserMail() {
        return userMail;
    }

    public void setUserMail(String userMail) {
        this.userMail = userMail;
    }

    public String getPassMail() {
        return passMail;
    }

    public void setPassMail(String passMail) {
        this.passMail = passMail;
    }

    public String getFromMail() {
        return fromMail;
    }

    public void setFromMail(String fromMail) {
        this.fromMail = fromMail;
    }

    public int getPortMail() {
        return portMail;
    }

    public void setPortMail(int portMail) {
        this.portMail = portMail;
    }

    public String getSmtpHostmail() {
        return smtpHostmail;
    }

    public void setSmtpHostmail(String smtpHostmail) {
        this.smtpHostmail = smtpHostmail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ConfiguracionMail)) {
            return false;
        }
        ConfiguracionMail other = (ConfiguracionMail) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.ConfiguracionMail[ id=" + id + " ]";
    }
    
}
